.category-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f5f5f5;
}

/* 头部 */
.category-page__header {
  background-color: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.category-page__title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.category-page__loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

/* 内容区域 */
.category-page__content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 左侧分类列表 */
.category-page__sidebar {
  width: 100px;
  background-color: #fff;
  border-right: 1px solid #eee;
  overflow-y: auto;
}

.category-page__category-item {
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.2s ease;
  position: relative;
}

.category-page__category-item:hover {
  background-color: #f8f8f8;
}

.category-page__category-item.active {
  background-color: #fff;
  color: #ff4757;
}

.category-page__category-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #ff4757;
}

.category-page__category-name {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
}

/* 右侧主要内容 */
.category-page__main {
  flex: 1;
  background-color: #fff;
  padding: 16px;
  overflow-y: auto;
}

.category-page__main-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* 子分类网格 */
.category-page__subcategory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-page__subcategory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  background-color: #fff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-page__subcategory-item:hover {
  background-color: #f8f8f8;
  border-color: #ff4757;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.1);
}

.category-page__subcategory-icon {
  font-size: 32px;
  margin-bottom: 8px;
  line-height: 1;
}

.category-page__subcategory-name {
  font-size: 13px;
  color: #333;
  text-align: center;
  line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .category-page__sidebar {
    width: 80px;
  }
  
  .category-page__category-item {
    padding: 12px 4px;
  }
  
  .category-page__category-name {
    font-size: 12px;
  }
  
  .category-page__subcategory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .category-page__subcategory-item {
    padding: 16px 8px;
  }
  
  .category-page__subcategory-icon {
    font-size: 28px;
  }
  
  .category-page__subcategory-name {
    font-size: 12px;
  }
}

/* 滚动条样式 */
.category-page__sidebar::-webkit-scrollbar,
.category-page__main::-webkit-scrollbar {
  width: 4px;
}

.category-page__sidebar::-webkit-scrollbar-track,
.category-page__main::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.category-page__sidebar::-webkit-scrollbar-thumb,
.category-page__main::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.category-page__sidebar::-webkit-scrollbar-thumb:hover,
.category-page__main::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
} 